# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import datetime

from django.db import models

from common import random_id
from conf.parameters import *


class AxeUserInfo(models.Model):
    id = models.CharField(primary_key=True, max_length=64, default=random_id.gen_random_object_id,
                          help_text="用户id。示例：5cffb92400a6ba91f7c5bda6")
    account = models.CharField(max_length=64, help_text="用户邮箱。")
    password = models.CharField(max_length=64, blank=False, null=False, help_text="用户密码。")
    phone_number = models.TextField(max_length=64, blank=True, null=True, help_text="手机号码。")
    name = models.CharField(max_length=255, blank=False, null=True, help_text="用户名称。")
    identity_name = models.CharField(max_length=255, blank=True, null=True, help_text="用户身份证姓名")
    identity_card = models.TextField(max_length=64, blank=True, null=True, help_text="用户身份证号")
    contact_address = models.TextField(blank=True, null=True, help_text="用户地址")
    application_industry = models.CharField(max_length=255, blank=True, null=True, help_text="应用信息")
    status = models.CharField(max_length=11, blank=True, null=True, help_text="用户状态", default=STATUS_ACTIVE)
    description = models.TextField(blank=True, null=True, help_text="用户描述。")
    create_at = models.DateTimeField(blank=True, null=True, default=datetime.datetime.now, help_text="创建时间。")
    update_at = models.DateTimeField(blank=True, null=True, help_text="更新时间。")
    delete_at = models.DateTimeField(blank=True, null=True, help_text="删除时间。")

    class Meta:
        managed = True
        db_table = 'axe_userinfo'
        unique_together = (('id', 'account'),)



